<template>
<h3>自定义事件传递数据</h3>
<button @click="sendClickHandle">点击传递</button>
</template>

<script>


export default{
    name:"MyComponent",
    data(){
        return{
            message:"我是Myconponment数据"
        }
    },
    methods:{
        sendClickHandle(){
            //参数1：字符串
            //参数2：传递的数据
      this.$emit("onEvent",this.this.message)
        }
    }
}  
 </script>

 <style scoped></style>